package aps

import glory.xxd.Utils
import org.json.JSONObject

class SubmitRemakeC2EController {

    def commentService

    def index() {
        def EQPID = params.EQPID ?: ""
        def OPID = params.OPID ?: ""
        def LOTID =params.LOTID?:''
        def REMARK =params.REMARK?:''

        def body =JSONObject.newInstance()
        body.put("EQPID",EQPID)
        body.put("OPID",OPID)
        body.put("LOTID",LOTID)
        body.put("REMARK",REMARK)

        String logUUID = Utils.getUUID();
        def header = JSONObject.newInstance()
        header.put("MESSAGENAME","SubmitRemakeC2E")
        header.put("TRANSACTIONID",logUUID)
        header.put("USERNAME",'PDA')

        def jsonAll = [Header:header,Body:body] //JSONObject.newInstance()

        def jsonRequest = JSONObject.newInstance()
        jsonRequest.put("Request",jsonAll)

        def json = commentService.getJsonByJsonForTopic2Queue(logUUID, jsonRequest)

        render json
    }
}
